This repository has been archived by the owner on May 17, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This attempts to fix #765
Hi guys, I added a quick fix which checks for dead entries in a Map before it adds any more. I ran this for a few days and it seems to works, heap dumps show we are no longer growing this structure. I was planning on adding a executor or something along those lines to do this at a scheduled interval, but this has been working so well I'm not sure its worth the extra complication (starting, stopping and cleaning up something). A listener for when these resources expire ( like a session listener in a servlet container) would be nice, but I could not find an obvious way to do that reliably.
I do want to say this is not something usually I'm comfortable doing, I feel like the little Dutch boy sticking his fingers in the dyke trying to stop each leak! Unfortunately the atmosphere framework has beaten me ;-), at least how its being used now. But since we know its not a long term solution for openHAB, I'll keep poking away.